Skip to content

fix(docs): show a poster frame for the quickstart video - #585

Open
AlexBodner wants to merge 1 commit into
developfrom
fix/docs-video-poster
Open

fix(docs): show a poster frame for the quickstart video#585
AlexBodner wants to merge 1 commit into
developfrom
fix/docs-video-poster

Conversation

@AlexBodner

Copy link
Copy Markdown
Collaborator

The video at the top of the quickstart page renders as an empty box until you press play.

Cause

It is the only <video> in the docs with preload="none" and no poster, so the browser fetches nothing at all, including the first frame. Every other video in docs/ either has autoplay (which forces loading) or leaves preload at the browser default.

Why not just change preload

preload="metadata" does fix the blank box, but measured in Chrome against a local build it pulled ~3.3 MB of the 13.1 MB file on page load, buffering 2.6s of video before any interaction. That is a poor trade on the page we most want to be fast.

A poster gets the same visual result for 34 KB and keeps preload="none", so no video bytes move until the visitor actually plays it.

The poster

Frame extracted at t=2.5s, where six riders are tracked with visible IDs, segmentation masks, and motion trails, so the still communicates multi-object tracking. The t=0 frame shows only two objects, one half off-screen. Encoded as WebP at 1280x720, matching the existing .webp assets under docs/assets/mcbyte/.

Also

Pinned aspect-ratio: 16/9 to match docs/trackers/*.md. Without it the element has no intrinsic size until the poster decodes, so it shifts layout on load.

Verification

In a browser against a local build:

Check Result
Poster paints before any interaction ✅ single 34 KB request
Video bytes transferred before play ✅ 0 KB
Playback after pressing play ✅ starts, buffers on demand
Captions track ✅ English track intact
Box height stable across load aspect-ratio: 16 / 9

🤖 Generated with Claude Code

The homepage video rendered as an empty box until the visitor pressed play.
It is the only video in the docs with preload="none" and no poster, so the
browser fetched nothing at all, including the first frame. Every other video
either autoplays or leaves preload at the browser default.

Add a poster frame (34 KB WebP, extracted at t=2.5s where six riders are
tracked with IDs, masks, and motion trails) so the element shows the demo
immediately. Keep preload="none": the poster renders with zero video bytes
fetched, where preload="metadata" made Chrome pull ~3.3 MB of the 13 MB file
on every page load.

Also pin aspect-ratio: 16/9, matching the tracker pages, so the element
reserves its final height before the poster loads instead of shifting layout.

Verified in a browser against a local build: poster paints from a single
34 KB request, 0 bytes of video transferred until play, playback then starts
normally, English captions track intact, box height stable across load.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant